{layout name="p/base"}
  <div id="page-wrapper">
    <div class="row">
      <div class="col-lg-12">
        <h1>房车管理 <small>房车维修保养</small></h1>
        <ol class="breadcrumb">
          <li><a href="index.php"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li><a href="car-list.php"><i class="fa fa-dashboard"></i> 房车信息列表</a></li>
          <li class="active"><i class="fa fa-table"></i> 房车维修保养列表</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          请正确填写车辆维修保养信息
        </div>
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
      <div class="col-lg-12">
        <div class="modal-content">
          <form id='addmaintain' class="form-horizontal" role="form" action="/maintain" method="post">
            
            <div class="modal-header">
              <h4 class="modal-title" id="myModalLabel">
                 添加房车维修/保养记录
              </h4>
            </div>
            <div class="modal-body">
              <div class="form-group ">
                <label for="firstname" class="control-label col-sm-3">服务类型</label>
                {foreach $service as $k => $v}
                    <label class="radio-inline">
                      <input id="service{$k}" name="service" value="{$k}" type="radio">{$v}
                    </label>
                {/foreach} 
                

              </div>
              <div class="form-group">
                <label  class="control-label col-sm-3">车辆编号</label>
                <div class="col-sm-9">
                  <select name='number' id="bs3Select" class="selectpicker show-tick form-control"  data-live-search="true">  
                    <option selected="true" value='0'>请选择车辆编号</option>
                    {volist name='caravan' id='vo'}
                    <option >{$vo.number}</option>  
                    {/volist}
                  </select>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-3">保养/维修日期</label>
                <div class="col-sm-9">
                  <input  class="form-control" type="text" name="servicedate" placeholder="请正确填写保养日期 例，2016-05-18">
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-3">作业地点</label>
                <div class="col-sm-9">
                  <input class="form-control" type="text" name="serviceaddress" placeholder="请正确填写维修或保养地点">
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-3">车辆行程</label>
                <div class="col-sm-9">
                  <input class="form-control" type="text" name="travel" placeholder="请正确填写车辆行程">
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-3">负责人</label>
                <div class="col-sm-9">
                 <input class="form-control" type="text" name="carperson" placeholder="请填写车辆负责人真实姓名">
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-3">总费用</label>
                <div class="col-sm-9">
                 <input class="form-control" type="text" name="cost" placeholder="请填写总费用">
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-3">描述</label>
                <div class="col-sm-9">
                 <textarea class="form-control" type="text" name="description" placeholder="请填写具体项目及费用" ></textarea>
              </div>
            </div>
            <div class="modal-footer">
              <input type="button" value="返回" class="btn btn-default"  onclick="javascript:history.back(-1);" />
              <button id='add' type="button" class="btn btn-primary">
                 提交
              </button>
            </div>
          </form>
        </div>
      </div>
    </div>
    <!-- /.row -->
  </div><!-- /#page-wrapper -->


<script type="text/javascript" src="/jquery.js"></script>
<script type="text/javascript">
  $(document).ready(function(){
    $("#add").click(function(){
      $("#addmaintain").submit();
      });
    });
</script>